package yunwo.cn.yzstation.presenter;

import yunwo.cn.yzstation.api.IassembleModel;
import yunwo.cn.yzstation.api.IassembleView;
import yunwo.cn.yzstation.base.BasePresenter;
import yunwo.cn.yzstation.bean.CarListBean;
import yunwo.cn.yzstation.model.AssembleModel;
import yunwo.cn.yzstation.view.activity.AssembleActivity;

/**
 * Created by lao on 2017/10/12.
 */

public class AssembleActivityPersenter extends BasePresenter<IassembleView> implements IassembleModel {
    AssembleActivity assembleActivity;
    IassembleView iassembleView;
    private final AssembleModel mAssembleModel;

    public AssembleActivityPersenter(AssembleActivity assembleActivity, IassembleView iassembleView) {
        this.assembleActivity = assembleActivity;
        this.iassembleView = iassembleView;
        mAssembleModel = new AssembleModel(assembleActivity, this);
    }

    public void getlistData(String type,int page,String orgtype) {
        mAssembleModel.getlistData(type,page,orgtype);
    }

    @Override
    public void getlistDataSuccess(CarListBean.DataBean dataBean,String type) {
        iassembleView.getlistDataSuccess(dataBean,type);
    }

    @Override
    public void getlistDatafailure() {
        iassembleView.getlistDatafailure();
    }
}
